import axiosApi from "./AxiosApi.js";

const costRegister = {
    page: {
        url: `/xssc/costExperiment/queryCost`,
        method: "POST"
    },
    save: {
        url: `/xssc/costExperiment`,
        method: "POST"
    },
    update: {
        url: `/xssc/costExperiment`,
        method: "PUT"
    },
    delete: {
        url: `/xssc/costExperiment`,
        method: "DELETE"
    },
    // 修正费用查询
    sampleCost: {
        url: `/xssc/costExperiment/sampleCost`,
        method: "POST"
    },
    // 修正费用保存
    updSampleCost: {
        url: `/xssc/costExperiment/updSampleCost`,
        method: "PUT"
    },
};
const costStatistics = {
    page: {
        url: `/xssc/costExperimentDetail/queryDetail`,
        method: "POST"
    },
};



export default {
    costRegister: {
        page(data) {
            return axiosApi({
                ...costRegister.page,
                // formData: true,
                data
            });
        },
        add(data) {
            return axiosApi({
                ...costRegister.save,
                // formData: true,
                data
            });
        },
        delete(data) {
            return axiosApi({
                ...costRegister.delete,
                // formData: true,
                data
            });
        },
        edit(data) {
            return axiosApi({
                ...costRegister.update,
                // formData: true,
                data
            });
        },
        sampleCost(data) {
            return axiosApi({
                ...costRegister.sampleCost,
                // formData: true,
                data
            });
        },
        updSampleCost(data) {
            return axiosApi({
                ...costRegister.updSampleCost,
                // formData: true,
                data
            });
        },
    },
    costStatistics: {
        page(data) {
            return axiosApi({
                ...costStatistics.page,
                // formData: true,
                data
            });
        },
    }
};
